/**
 * Project:   dtu.fmes.googleloon
 * File:      BatteryModule.java
 * License: 
 *            This file is licensed under GNU General Public License version 3
 *            http://www.gnu.org/licenses/gpl-3.0.txt
 *
 * Copyright:	Bartosz Cichecki [ cichecki.bartosz@gmail.com ]
 * 				Nicolai Sonne [ NicolaiSonne@hotmail.com.com ]
 * Date:      Dec 11, 2013
 */

package dtu.fmes.loon.model.balloon;

/**
 * 
 * @author Bartosz Cichecki, Nicolai Sonne
 */
public class BatteryModule {

	private Double startingCapacity = null;

	private Double maximumCapacity = null;

	private Double weight = null;

	public BatteryModule() {

	}

	public BatteryModule(Double startingCapacity, Double maximumCapacity, Double weight) {
		super();
		this.startingCapacity = startingCapacity;
		this.maximumCapacity = maximumCapacity;
		this.weight = weight;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (obj == null) {
			return false;
		}
		if (getClass() != obj.getClass()) {
			return false;
		}
		BatteryModule other = (BatteryModule) obj;
		if (maximumCapacity == null) {
			if (other.maximumCapacity != null) {
				return false;
			}
		} else if (!maximumCapacity.equals(other.maximumCapacity)) {
			return false;
		}
		if (startingCapacity == null) {
			if (other.startingCapacity != null) {
				return false;
			}
		} else if (!startingCapacity.equals(other.startingCapacity)) {
			return false;
		}
		if (weight == null) {
			if (other.weight != null) {
				return false;
			}
		} else if (!weight.equals(other.weight)) {
			return false;
		}
		return true;
	}

	public Double getMaximumCapacity() {
		return maximumCapacity;
	}

	public Double getStartingCapacity() {
		return startingCapacity;
	}

	public Double getWeight() {
		return weight;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + (maximumCapacity == null ? 0 : maximumCapacity.hashCode());
		result = prime * result + (startingCapacity == null ? 0 : startingCapacity.hashCode());
		result = prime * result + (weight == null ? 0 : weight.hashCode());
		return result;
	}

	public void setMaximumCapacity(Double maximumCapacity) {
		this.maximumCapacity = maximumCapacity;
	}

	public void setStartingCapacity(Double startingCapacity) {
		this.startingCapacity = startingCapacity;
	}

	public void setWeight(Double weight) {
		this.weight = weight;
	}

	@Override
	public String toString() {
		return "BatteryModule [startingCapacity=" + startingCapacity + ", maximumCapacity=" + maximumCapacity + ", weight=" + weight + "]";
	}

}
